package com.eastfair.projectcore.hystrix;

import com.alibaba.fastjson.JSONObject;
import com.eastfair.core.base.R;
import com.eastfair.model.DataIsolationVo;
import com.eastfair.model.TenantRuleVO;
import com.eastfair.projectcore.api.ProjectCoreServiceFeign;
import com.eastfair.projectcore.dto.DataIsolationDTO;
import com.eastfair.projectcore.dto.InterfaceInfoDTO;
import com.eastfair.projectcore.dto.MenuDTO;
import com.eastfair.projectcore.entity.Area;
import com.eastfair.projectcore.entity.InterfaceInfo;
import com.eastfair.projectcore.entity.ProjectDb;
import com.eastfair.projectcore.entity.WorkerNode;
import com.eastfair.projectcore.vo.AreaVO;
import com.eastfair.projectcore.vo.MenuVO;
import org.springframework.stereotype.Component;

import java.io.Serializable;
import java.util.List;
import java.util.Map;
import java.util.Set;

/**
 * 用户API熔断
 *
 * @author zuihou
 * @date 2019/07/23
 */
@Component
public class ProjectCoreApiFallback implements ProjectCoreServiceFeign {

    @Override
    public R<ProjectDb> getProjectById(Long projectId) {
        return R.timeout();
    }

    @Override
    public R<List<DataIsolationVo>> queryDataIsolaction(DataIsolationDTO dataIsolationDTO) {
        return R.timeout();
    }

    @Override
    public Map<Serializable, Object> findByNames(Set<Serializable> types) {
        return null;
    }

    @Override
    public R<List<MenuVO>> findAllByChildId(MenuDTO menuDTO) {
        return R.timeout();
    }

    @Override
    public R<List<MenuVO>> findAllByChildIdNoButton(MenuDTO menuDTO) {
        return R.timeout();
    }

    @Override
    public R<List<String>> findPermissionAllByChildId(MenuDTO menuDTO) {
        return R.timeout();
    }

    @Override
    public R<List<String>> findInterfaceAllByChildId(MenuDTO menuDTO) {
        return R.timeout();
    }

    @Override
    public R recommendHotImage(Long id, Boolean isRecommend) {
        return R.timeout();
    }

    @Override
    public R top(Long id) {
        return R.timeout();
    }

    @Override
    public R<Area> getAreaById(Integer id) {
        return R.timeout();
    }

    @Override
    public R<String> getPhoneCodeByAreaId(Integer id) {
        return R.timeout();
    }

    @Override
    public R<Boolean> imgvrify(String verifyId, String verifyValue) {
        return R.timeout();
    }

    @Override
    public R<List<AreaVO>> queryListArea(Area area) {
        return R.timeout();
    }

    @Override
    public Long createWorkNode() {
        return null;
    }

    @Override
    public R<List<Long>> queryAllMenuId() {
        return null;
    }

    @Override
    public R<List<Long>> queryBestChildMenuId(List<Long> menuIds) {
        return R.timeout();
    }

    @Override
    public R<List<TenantRuleVO>> queryTenantTable() {
        return R.timeout();
    }

    @Override
    public R executeAllUrl(List<JSONObject> interfaceInfos) {
        return R.timeout();
    }

    @Override
    public R<List<InterfaceInfo>> querySystem(InterfaceInfoDTO interfaceInfoDTO) {
        return R.timeout();
    }

    @Override
    public R<WorkerNode> createBaiduWorkNode(WorkerNode workerNodeEntity) {
        return R.timeout();
    }
}
